<?php
error_reporting(0);
session_start();
include_once '../comm/config.php';
include_once 'page.class.php';
include_once '../comm/checkpostandget.php';
include_once '../comm/wjt.php';
include_once 'check.php';

$page = !($_GET['page'])?'1':intval($_GET['page']);
$pagesize=10;
$page2=($page-1)*$pagesize;

$hlink = mysql_connect($dbserver, $dbuser, $dbpass);
if (!$hlink) {
	die(ERR_DB);
}
else
{
	mysql_query("set names utf8");
	mysql_select_db($dbname);
	$q = "SELECT * FROM ".$BIAOTOU."user where ddusername='".$_SESSION["ddusername"]."'";
	$rs = mysql_query($q);
	while($row = mysql_fetch_object($rs)) 
	{
		$money=$row->money;
		$yitixian=$row->yitixian;
		$zfb=$row->zfb;
		$dengji=$row->dengji;
		$txstate=$row->txstate;
		
	}
}
mysql_close($hlink);
$tag="center";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>用户管理中心</title>
<link href="../css/usercss.css" rel="stylesheet" type="text/css">
<link href="../template/<?=MOBAN?>/css/common.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../js/jquery.js"></script>
</head>

<body id="usercenter">
<?php
include("../template/".MOBAN."/header.tpl.php");
?>
<?php
include("../template/".MOBAN."/nav.tpl.php");
?>
<div id="main">
<?php
include("left.php");
?>
<DIV class=contain>
<H2 class=left_nav1>用户管理中心</H2>
<DIV class=balance>
<DIV class=head_pic><A href="#"><IMG 
src="../images/noface.gif" width=108 height=108></A></DIV>
<DIV class=content>
<H4>您好：<?=$_SESSION["ddusername"]?>，欢迎您回来!　</H4>
<P>账户总余额：<EM class=red><?=number_format($money,2)?></EM> 元； &nbsp;&nbsp; 会员等级：<?php if($dengji<DENGJI1) echo "<img src=\"../images/v0.gif\"  alt=\"普通会员\" />";else if($dengji>=DENGJI1&&$dengji<DENGJI2) echo "<img src=\"../images/v1.gif\"  alt=\"黄金会员\"/>";else if($dengji>=DENGJI2&&$dengji<DENGJI3) echo "<img src=\"../images/v2.gif\" alt=\"白金会员\"  />";  else echo "<img src=\"../images/v3.gif\" alt=\"钻石会员\" />";?> 
  ；&nbsp;&nbsp;&nbsp;目前成长值：
  <?=$dengji?>&nbsp; 点；</P>
<P>您已经提现：<EM class=red><?=number_format($yitixian,2)?></EM> 元&nbsp;&nbsp; <A 
href="mingxilist.php?act=out">&gt;&gt;查看提现历史</A></P></DIV></DIV>
<DIV class=cash><div class="title">提现提示</div>
<DIV class=content>
<DIV class=ti><?php
if($txstate=='1'){
	echo "<font color=#dd0000>您当前有一笔提现申请正在处理当中，我们将支付到您的支付宝中，请注意查收！</font> <a href=\"mingxilist.php?act=out\">>>查看详细</a>";
}else{
	if($money==0){
		echo "<font color=#118c22>感谢您使用".WEBTITLE."，当您购物累积获得返现超过".TIXIANJE."元，就可以申请提现。祝您购物愉快！</font>";
	}elseif($money<TIXIANJE){
		echo "您当前的账户余额是 <em>".$money."</em> 元，还差 <em>".(TIXIANJE-$money)."</em> 元就可以申请提现了！";
	}else{
		echo "您当前的账户余额是 <em>".$money."</em> 元，可以申请提现了！&nbsp;&nbsp;&nbsp;&nbsp;<input name=\"tx\" onclick=\"window.location='tixian.php'\" value=\"申请提现\" class=smt type=\"button\" />";
	}
}
?></DIV>
<DIV class=notice><STRONG>注意事项：</STRONG><BR>
当您的账户金额达到 <font style="color:#990000; font-style:italic; font-weight:bold"><?=TIXIANJE?></font> 元后就可以申请提现，提现金额必须是<?=TIXIANJE?>或<?=TIXIANJE?>的倍数。<BR>
提交提现申请后，我们会在1个工作日内把钱通过支付宝支付到您填写的支付宝收款账号里，便于核对帐号，请留真实姓名。<BR>
</DIV></DIV></DIV></DIV>
<DIV class=clear></DIV></DIV>
</div>
<?php
include("../template/".MOBAN."/footer.tpl.php");
?>
</body>
</html>